package ss9999999999;

public class six {
    public static void main(String[] args) {
        for (int i = 1000; i <= 9999; i++) {
            int a=i- i/1000*1000;
            if(a*3==i){
                System.out.println(i);
            }
        }

    }
}